---
id: 657effaa2a5e0277d71f9cbe
title: الخطوة 8
challengeType: 20
dashedName: step-8
---

# --description--

By the end of the loop, `snake_cased_char_list` should contain all the converted characters in correct order. Use the `.join()` string method to convert the list of characters into a string.

```py
''.join(snake_cased_char_list)
```

This joins the characters from the list to the empty string on which you called the `.join()` method. Save the result in a variable named `snake_cased_string` on the same level as the `snake_cased_char_list` variable.

# --hints--

You should join the characters in the `snake_cased_char_list` list into a string using the `.join()` method and assign the string to a variable named `snake_cased_string` after your `for` loop.

```js
({
    test: () => {
        const transformedCode = code.replace(/\r/g, "");
        const convert_to_snake_case = __helpers.python.getDef("\n" + transformedCode, "convert_to_snake_case");
        const { function_body } = convert_to_snake_case;

        assert.match(function_body, / +snake_cased_string\s*=\s*('|")\1\.join\s*\(\s*snake_cased_char_list\s*\)/);
    }
})
```

# --seed--

## --seed-contents--

```py
def convert_to_snake_case(pascal_or_camel_cased_string):
    snake_cased_char_list = []
    for char in pascal_or_camel_cased_string:
        if char.isupper():
            converted_character = '_' + char.lower()
            snake_cased_char_list.append(converted_character)
        else:
            snake_cased_char_list.append(char)
--fcc-editable-region--


--fcc-editable-region--
```
